Skip to main content
Version: 8.4.10.4

StockBookQuote

V8 Message Definiton

This table contains live equity quote records for all CQS/UQDF securities as well as US OTC equity securities, SpiderRock synthetic markets, and a number of major indexes. Each record contains up to two price levels and represents a live snapshot of the book for a specific market.

METADATA

AttributeValue
Topic2990-market-data-stock
MLink TokenEqtMktData
ProductSRLive
accessTypeSELECT

Table Definition

FieldTypeKeyDefault ValueComment
ticker_atenum - AssetTypePRI'None'
ticker_tsenum - TickerSrcPRI'None'
ticker_tkVARCHAR(12)PRI''
updateTypeenum - UpdateType'None'
marketStatusenum - MarketStatus'None'market status open halted etc
bidPrice1FLOAT0bid price for best price level
bidSize1INT0bid size for best price level
bidExch1enum - StkExch'None'
bidMask1INT UNSIGNED0bid exchange bit mask for best bid price level
askPrice1FLOAT0ask price for best price level
askSize1INT0ask size for best price level
askExch1enum - StkExch'None'exchange
askMask1INT UNSIGNED0ask exchange bit mask for best ask price level
bidPrice2FLOAT0bid price for next best price level
bidSize2INT0bid size for next best price level
bidExch2enum - StkExch'None'exchange
bidMask2INT UNSIGNED0bid exchange bit mask for next best bid price level
askPrice2FLOAT0ask price for next best price level
askSize2INT0ask size for next best price level
askExch2enum - StkExch'None'exchange
askMask2INT UNSIGNED0ask exchange bit mask for next best ask price level
haltMaskINT UNSIGNED0bit mask of halted exchanges
srcTimestampBIGINT0source high precision timestamp if available
netTimestampBIGINT0inbound packet PTP timestamp from SR gateway switchusually syncronized with facility grandfather clock

PRIMARY KEY DEFINITION (Unique)

FieldSequence
ticker_tk1
ticker_at2
ticker_ts3

CREATE TABLE EXAMPLE QUERY

CREATE TABLE `SRLive`.`MsgStockBookQuote` (
`ticker_at` ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') NOT NULL DEFAULT 'None',
`ticker_ts` ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') NOT NULL DEFAULT 'None',
`ticker_tk` VARCHAR(12) NOT NULL DEFAULT '',
`updateType` ENUM('None','PrcChange','SizeOnly','PrevPeriod') NOT NULL DEFAULT 'None',
`marketStatus` ENUM('None','PreOpen','PreCross','Cross','Open','Closed','Halted','AfterHours') NOT NULL DEFAULT 'None' COMMENT 'market status (open, halted, etc)',
`bidPrice1` FLOAT NOT NULL DEFAULT 0 COMMENT 'bid price for best price level',
`bidSize1` INT NOT NULL DEFAULT 0 COMMENT 'bid size for best price level',
`bidExch1` ENUM('None','AMEX','NQBX','NSX','FNRA','ISE','EDGA','EDGX','CHX','NYSE','ARCA','NSDQ','CBSX','PSX','BTSY','BATS','CBIDX','IEX','OTC','MPRL','LTSE','MEMX','MXIDX','DJIDX','BXE','CXE','DXE','XETRA','NXAM','NXBR','NXLS','NXML','NXOS','NXP') NOT NULL DEFAULT 'None',
`bidMask1` INT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'bid exchange bit mask for best bid price level',
`askPrice1` FLOAT NOT NULL DEFAULT 0 COMMENT 'ask price for best price level',
`askSize1` INT NOT NULL DEFAULT 0 COMMENT 'ask size for best price level',
`askExch1` ENUM('None','AMEX','NQBX','NSX','FNRA','ISE','EDGA','EDGX','CHX','NYSE','ARCA','NSDQ','CBSX','PSX','BTSY','BATS','CBIDX','IEX','OTC','MPRL','LTSE','MEMX','MXIDX','DJIDX','BXE','CXE','DXE','XETRA','NXAM','NXBR','NXLS','NXML','NXOS','NXP') NOT NULL DEFAULT 'None' COMMENT 'exchange',
`askMask1` INT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'ask exchange bit mask for best ask price level',
`bidPrice2` FLOAT NOT NULL DEFAULT 0 COMMENT 'bid price for next best price level',
`bidSize2` INT NOT NULL DEFAULT 0 COMMENT 'bid size for next best price level',
`bidExch2` ENUM('None','AMEX','NQBX','NSX','FNRA','ISE','EDGA','EDGX','CHX','NYSE','ARCA','NSDQ','CBSX','PSX','BTSY','BATS','CBIDX','IEX','OTC','MPRL','LTSE','MEMX','MXIDX','DJIDX','BXE','CXE','DXE','XETRA','NXAM','NXBR','NXLS','NXML','NXOS','NXP') NOT NULL DEFAULT 'None' COMMENT 'exchange',
`bidMask2` INT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'bid exchange bit mask for next best bid price level',
`askPrice2` FLOAT NOT NULL DEFAULT 0 COMMENT 'ask price for next best price level',
`askSize2` INT NOT NULL DEFAULT 0 COMMENT 'ask size for next best price level',
`askExch2` ENUM('None','AMEX','NQBX','NSX','FNRA','ISE','EDGA','EDGX','CHX','NYSE','ARCA','NSDQ','CBSX','PSX','BTSY','BATS','CBIDX','IEX','OTC','MPRL','LTSE','MEMX','MXIDX','DJIDX','BXE','CXE','DXE','XETRA','NXAM','NXBR','NXLS','NXML','NXOS','NXP') NOT NULL DEFAULT 'None' COMMENT 'exchange',
`askMask2` INT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'ask exchange bit mask for next best ask price level',
`haltMask` INT UNSIGNED NOT NULL DEFAULT 0 COMMENT 'bit mask of halted exchanges',
`srcTimestamp` BIGINT NOT NULL DEFAULT 0 COMMENT 'source high precision timestamp (if available)',
`netTimestamp` BIGINT NOT NULL DEFAULT 0 COMMENT 'inbound packet PTP timestamp from SR gateway switch;usually syncronized with facility grandfather clock',
PRIMARY KEY USING HASH (`ticker_tk`,`ticker_at`,`ticker_ts`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='This table contains live equity quote records for all CQS/UQDF securities as well as US OTC equity securities, SpiderRock synthetic markets, and a number of major indexes. Each record contains up to two price levels and represents a live snapshot of the book for a specific market.';

SELECT TABLE EXAMPLE QUERY

SELECT
`ticker_at`,
`ticker_ts`,
`ticker_tk`,
`updateType`,
`marketStatus`,
`bidPrice1`,
`bidSize1`,
`bidExch1`,
`bidMask1`,
`askPrice1`,
`askSize1`,
`askExch1`,
`askMask1`,
`bidPrice2`,
`bidSize2`,
`bidExch2`,
`bidMask2`,
`askPrice2`,
`askSize2`,
`askExch2`,
`askMask2`,
`haltMask`,
`srcTimestamp`,
`netTimestamp`
FROM `SRLive`.`MsgStockBookQuote`
WHERE
/* Replace with a ENUM('None','EQT','IDX','BND','CUR','COM','FUT','SYN','WAR','FLX','MUT','SPD','MM','MF','COIN','TOKEN','ANY') */
`ticker_at` = 'None'
AND
/* Replace with a ENUM('None','SR','NMS','CME','ICE','CFE','CBOT','NYMEX','COMEX','RUT','CIDX','ARCA','NYSE','OTC','NSDQ','MFQS','MIAX','DJI','CUSIP','ISIN','BXE','EUX','ANY','CXE','DXE','NXAM','NXBR','NXLS','NXML','NXOS','NXP','EUREX','CEDX','ICEFE') */
`ticker_ts` = 'None'
AND
/* Replace with a VARCHAR(12) */
`ticker_tk` = 'Example_ticker_tk';

Doc Columns Query

SELECT * FROM SRLive.doccolumns WHERE TABLE_NAME='StockBookQuote' ORDER BY ordinal_position ASC;